﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Vision.Common
{
    public class CDrawPath:CDrawObj
    {
        public List<PointF> Points { get; set; } = new List<PointF>();
        public Color color { get; set; } = Color.Red;
        public override void Draw(Graphics g, float scale = 1)
        {
            if (m_visible == false)
                return;
            if (scale > 1)
                scale = 1;
            GraphicsPath path = new GraphicsPath();
            path.AddLines(Points.ToArray());
            path.CloseFigure();
            Pen pen = new Pen(color, 2/scale);
            g.DrawPath(pen, path);
        }
    }
}
